<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>bui.scroll</title>
    <!-- <link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css"> -->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
    <link rel="stylesheet" href="../assets/css/cssgrids-min.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
    <link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
    <!-- <script src="http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js"></script> -->
    <script src="../assets/js/jquery-1.9.1.min.js"></script>
    <script src="../assets/js/index.js"></script>
    <script src="../assets/js/yui-min.js"></script>
    <script src="../assets/js/combo/oop-min.js"></script>
    <script src="../assets/js/combo/array-extras-min.js"></script>
    <script src="../assets/js/combo/autocomplete.js"></script>
    <script src="../assets/js/combo/history-base-min.js"></script>
</head>
<body class="yui3-skin-sam">
<div id="sidemenu" class="sidebar-menu">菜单</div>
<div id="doc">
    <div id="hd" class="yui3-g header">
        <div class="yui3-u-3-4">
            
                <h1><a href="../index.html"><img src="../assets/css/logo.png" title="" width="30px"></a>
                <a href="../index.html">BUI</a>
                
                </h1>
            
            <p class="off-left">其它版本:<select name="" id="" onchange="window.location.href=this.value"><option value="../api/index.html" selected>1.5.0</option><option value="../api-1.4.8/index.html">1.4.8</option></select></p>
            <p class="off-left" style="font-size:12px;margin-right: 15px;">API for BUI 1.5.4 </p>
            
        </div>
    </div>
    <div id="bd" class="yui3-g">

        <div id="sidebar" class="yui3-u-1-4">
            <div id="docs-sidebar" class="sidebar apidocs">
                <div id="api-list">
    <div id="api-tabview" class="tabview">

        <ul class="tabs">
            <li><a href="#api-classes">Classes</a></li>
            <li><a href="#api-modules">Modules</a></li>
        </ul>

        <div id="api-tabview-filter">
            <input type="search" id="api-filter" placeholder="Type to filter APIs">
        </div>

        <div id="api-tabview-panel">
            <ul id="api-classes" class="apis classes">
            
                <li><a href="../classes/bui.accordion.html">bui.accordion</a></li>
            
                <li><a href="../classes/bui.actionsheet.html">bui.actionsheet</a></li>
            
                <li><a href="../classes/bui.ajax.html">bui.ajax</a></li>
            
                <li><a href="../classes/bui.alert.html">bui.alert</a></li>
            
                <li><a href="../classes/bui.all.html">bui.all</a></li>
            
                <li><a href="../classes/bui.animate.html">bui.animate</a></li>
            
                <li><a href="../classes/bui.array.html">bui.array</a></li>
            
                <li><a href="../classes/bui.back.html">bui.back</a></li>
            
                <li><a href="../classes/bui.btn.html">bui.btn</a></li>
            
                <li><a href="../classes/bui.config.html">bui.config</a></li>
            
                <li><a href="../classes/bui.confirm.html">bui.confirm</a></li>
            
                <li><a href="../classes/bui.delete.html">bui.delete</a></li>
            
                <li><a href="../classes/bui.dialog.html">bui.dialog</a></li>
            
                <li><a href="../classes/bui.download.html">bui.download</a></li>
            
                <li><a href="../classes/bui.dropdown.html">bui.dropdown</a></li>
            
                <li><a href="../classes/bui.emitter.html">bui.emitter</a></li>
            
                <li><a href="../classes/bui.file.html">bui.file</a></li>
            
                <li><a href="../classes/bui.fileselect.html">bui.fileselect</a></li>
            
                <li><a href="../classes/bui.get.html">bui.get</a></li>
            
                <li><a href="../classes/bui.getPageParams.html">bui.getPageParams</a></li>
            
                <li><a href="../classes/bui.guid.html">bui.guid</a></li>
            
                <li><a href="../classes/bui.hint.html">bui.hint</a></li>
            
                <li><a href="../classes/bui.init.html">bui.init</a></li>
            
                <li><a href="../classes/bui.input.html">bui.input</a></li>
            
                <li><a href="../classes/bui.levelselect.html">bui.levelselect</a></li>
            
                <li><a href="../classes/bui.list.html">bui.list</a></li>
            
                <li><a href="../classes/bui.listview.html">bui.listview</a></li>
            
                <li><a href="../classes/bui.load.html">bui.load</a></li>
            
                <li><a href="../classes/bui.loader.html">bui.loader</a></li>
            
                <li><a href="../classes/bui.loading.html">bui.loading</a></li>
            
                <li><a href="../classes/bui.mask.html">bui.mask</a></li>
            
                <li><a href="../classes/bui.number.html">bui.number</a></li>
            
                <li><a href="../classes/bui.pickerdate.html">bui.pickerdate</a></li>
            
                <li><a href="../classes/bui.platform.html">bui.platform</a></li>
            
                <li><a href="../classes/bui.post.html">bui.post</a></li>
            
                <li><a href="../classes/bui.prompt.html">bui.prompt</a></li>
            
                <li><a href="../classes/bui.pullrefresh.html">bui.pullrefresh</a></li>
            
                <li><a href="../classes/bui.put.html">bui.put</a></li>
            
                <li><a href="../classes/bui.rating.html">bui.rating</a></li>
            
                <li><a href="../classes/bui.ready.html">bui.ready</a></li>
            
                <li><a href="../classes/bui.refresh.html">bui.refresh</a></li>
            
                <li><a href="../classes/bui.router.html">bui.router</a></li>
            
                <li><a href="../classes/bui.run.html">bui.run</a></li>
            
                <li><a href="../classes/bui.scroll.html">bui.scroll</a></li>
            
                <li><a href="../classes/bui.searchbar.html">bui.searchbar</a></li>
            
                <li><a href="../classes/bui.select.html">bui.select</a></li>
            
                <li><a href="../classes/bui.sidebar.html">bui.sidebar</a></li>
            
                <li><a href="../classes/bui.slide.html">bui.slide</a></li>
            
                <li><a href="../classes/bui.stepbar.html">bui.stepbar</a></li>
            
                <li><a href="../classes/bui.storage.html">bui.storage</a></li>
            
                <li><a href="../classes/bui.store.html">bui.store</a></li>
            
                <li><a href="../classes/bui.swipe.html">bui.swipe</a></li>
            
                <li><a href="../classes/bui.tab.html">bui.tab</a></li>
            
                <li><a href="../classes/bui.typeof.html">bui.typeof</a></li>
            
                <li><a href="../classes/bui.unit.html">bui.unit</a></li>
            
                <li><a href="../classes/bui.upload.html">bui.upload</a></li>
            
                <li><a href="../classes/bui.viewport.html">bui.viewport</a></li>
            
            </ul>

            <ul id="api-modules" class="apis modules">
            
                <li><a href="../modules/Animate.html">Animate</a></li>
            
                <li><a href="../modules/Core.html">Core</a></li>
            
                <li><a href="../modules/Event.html">Event</a></li>
            
                <li><a href="../modules/Method.html">Method</a></li>
            
                <li><a href="../modules/Native.html">Native</a></li>
            
                <li><a href="../modules/UI.html">UI</a></li>
            
            </ul>
        </div>
    </div>
</div>
 
            </div>
        </div>
        <div class="yui3-u-3-4">
                <div id="api-options">
        Show:
        <label for="api-show-inherited">
            <input type="checkbox" id="api-show-inherited" checked>
            Inherited
        </label>

        <label for="api-show-protected">
            <input type="checkbox" id="api-show-protected">
            Protected
        </label>

        <label for="api-show-private">
            <input type="checkbox" id="api-show-private">
            Private
        </label>
        <label for="api-show-deprecated">
            <input type="checkbox" id="api-show-deprecated">
            Deprecated
        </label>

    </div>


            <div class="apidocs">
                <div id="docs-main">
                    <div class="content">
                        <h1>bui.scroll Class</h1>
<div class="box meta">
    

    

    
        <div class="foundat">
            Defined in: <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l10"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:10</code></a>
        </div>
    

    
        
            Module: <a href="../modules/UI.html">UI</a>
        
    

    
</div>



<div class="box intro">
    <div class="oui-fluid">
  <div class="span8">
    <h2>滚动控件</h2>
    <p>上拉加载,下拉刷新</p>
    <p>可以自由定义上拉事件,下拉事件,如果无特殊要求,推荐使用 <a href="../classes/bui.list.html" class="crosslink">bui.list</a> </p>
    <h3>预览地址: <a href="../../index.html#pages/ui_controls/bui.scroll.html" target="_blank">demo</a></h3>
    <h3>方法说明:</h3>
 <a href="../classes/bui.scroll.html#method_refresh" class="crosslink">refresh</a>: 触发下拉的方法 <br>
 <a href="../classes/bui.scroll.html#method_reverse" class="crosslink">reverse</a>: 还原位置,下拉请求完数据以后,需要还原位置 <br>
 <a href="../classes/bui.scroll.html#method_load" class="crosslink">load</a>: 触发加载某一页数据 <br>
 <a href="../classes/bui.scroll.html#method_nextPage" class="crosslink">nextPage</a>: 触发加载下一页数据 <br>
 <a href="../classes/bui.scroll.html#method_prevPage" class="crosslink">prevPage</a>: 触发加载上一页数据 <br>
 <a href="../classes/bui.scroll.html#method_filter" class="crosslink">filter</a>: 过滤数据 <br>
 <a href="../classes/bui.scroll.html#method_fail" class="crosslink">fail</a>: 请求失败以后,可以变为点击加载 <br>
 <a href="../classes/bui.scroll.html#method_updatePage" class="crosslink">updatePage</a>: 更新分页及缓存 <br>
 bui.scroll/isRefresh: 获取当前是刷新状态还是加载 <br>
 <h5>内容交互方法</h5>
 <a href="../classes/bui.scroll.html#method_lock" class="crosslink">lock</a>: 不允许滚动加载 <br>
 <a href="../classes/bui.scroll.html#method_unlock" class="crosslink">unlock</a>: 允许滚动加载 <br>
 <a href="../classes/bui.scroll.html#method_setHeight" class="crosslink">setHeight</a>: 设置内容滚动高度 <br>
 <a href="../classes/bui.scroll.html#method_to" class="crosslink">to</a>: 滚动条跳转到第几个元素 <br>
 <a href="../classes/bui.scroll.html#method_toBottom" class="crosslink">toBottom</a>: 跳到底部 <br>
 <a href="../classes/bui.scroll.html#method_scrollTop" class="crosslink">scrollTop</a>: 滚动多少px <br>
 <h5>公共方法</h5>
 <a href="../classes/bui.scroll.html#method_option" class="crosslink">option</a>: 获取设置参数 <br>
 <a href="../classes/bui.scroll.html#method_widget" class="crosslink">widget</a>: 获取依赖控件 <br>
  </div>
  <div class="span4"><a href="../../index.html#pages/ui_controls/bui.list_news.html" target="_blank"><img src="http://www.easybui.com/static/images/controls/bui-list_low.gif" alt="控件预览"/></a></div>
</div>
</div>


    <div class="constructor">
        <h2>Constructor</h2>
        <div id="method_bui.scroll" class="method item">
    <h3 class="name"><code>bui.scroll</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code class="optional">[option]</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l10"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:10</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name optional">[option]</code>
                        <span class="type">Object</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                         
                    </div>

                    
                        <ul class="params-list">
                            
                            <li class="param">
                                
                                    <code class="param-name">id</code>
                                    <span class="type">String</span>
                                

                                <div class="param-description">
                                    <p>[ 控件的ID,需要满足固定的结构 ]</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name">children</code>
                                    <span class="type">String</span>
                                

                                <div class="param-description">
                                    <p>[ 列表的样式不能为空, 找到要循环遍历的元素的父层 例如 .bui-list ]</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name">handle</code>
                                    <span class="type">String</span>
                                

                                <div class="param-description">
                                    <p>[ 默认li, 找到要循环遍历的元素  ]</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name">lastUpdated</code>
                                    <span class="type">Bollean</span>
                                

                                <div class="param-description">
                                    <p>[ 下拉的文本提醒是否显示时间 ]</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name">distance</code>
                                    <span class="type">Number</span>
                                

                                <div class="param-description">
                                    <p>[ 下拉的距离大于这个数才会触发 ]</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name">maxDistance</code>
                                    <span class="type">Number</span>
                                

                                <div class="param-description">
                                    <p>[ 1.4.2新增 默认0,下拉的距离超过最大值自动触发返回 ]</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name">stopHandle</code>
                                    <span class="type">String</span>
                                

                                <div class="param-description">
                                    <p>[ 1.4.2新增,样式名,默认为空,支持多个样式名,以逗号间隔. 当这个值等于下拉刷新里面的某个样式,不触发下拉刷新,一般用于事件冲突,比方 input[type=range] 无法滑动的时候 ]</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name">height</code>
                                    <span class="type">Number</span>
                                

                                <div class="param-description">
                                    <p>[ 为0时,自适应高度 ]</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name">page</code>
                                    <span class="type">Number</span>
                                

                                <div class="param-description">
                                    <p>[ 请求的页数,默认为1 ]</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name">pageSize</code>
                                    <span class="type">Number</span>
                                

                                <div class="param-description">
                                    <p>[ 每页的大小,默认为10 ]</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name">autoRefresh</code>
                                    <span class="type">Boolean</span>
                                

                                <div class="param-description">
                                    <p>[ 默认false 自动刷新 ]</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name">autoNext</code>
                                    <span class="type">Boolean</span>
                                

                                <div class="param-description">
                                    <p>[ 默认true 当高度不足时,会继续请求下一页,直到高度出现滚动条 ]</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name">refresh</code>
                                    <span class="type">Boolean</span>
                                

                                <div class="param-description">
                                    <p>[ 允许下拉刷新, 默认true | false  ]</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name">autoScroll</code>
                                    <span class="type">Boolean</span>
                                

                                <div class="param-description">
                                    <p>[ 默认true 滚动到底部触发, false 自己监听 ]</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name optional">[onBeforeRefresh]</code>
                                    <span class="type">Function</span>
                                    <span class="flag optional" title="This parameter is optional.">optional</span>
                                

                                <div class="param-description">
                                    <p>[ 1.5.2新增, 刷新前执行]</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name optional">[onBeforeLoad]</code>
                                    <span class="type">Function</span>
                                    <span class="flag optional" title="This parameter is optional.">optional</span>
                                

                                <div class="param-description">
                                    <p>[ 1.5.2新增, 加载前执行]</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name">onRefresh</code>
                                    <span class="type">Function</span>
                                

                                <div class="param-description">
                                    <p>[ 下拉以后执行 ]</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name">onLoad</code>
                                    <span class="type">Function</span>
                                

                                <div class="param-description">
                                    <p>[ 滚动加载后执行回调,在数据渲染后 ]</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name">onScrolling</code>
                                    <span class="type">Function</span>
                                

                                <div class="param-description">
                                    <p>[ 滚动时触发 ]</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name optional">[onBeforeInit]</code>
                                    <span class="type">Function</span>
                                    <span class="flag optional" title="This parameter is optional.">optional</span>
                                

                                <div class="param-description">
                                    <p>[ 1.5.1新增 初始化前触发 ]</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name optional">[onInited]</code>
                                    <span class="type">Function</span>
                                    <span class="flag optional" title="This parameter is optional.">optional</span>
                                

                                <div class="param-description">
                                    <p>[ 1.5.1新增 初始化以后触发 ]</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name">refreshTips</code>
                                    <span class="type">Object</span>
                                

                                <div class="param-description">
                                    
                                </div>

                                
                                    <ul class="params-list">
                                        
                                        <li class="param">
                                            
                                                <code class="param-name">start</code>
                                                <span class="type">String</span>
                                            

                                            <div class="param-description">
                                                [ 开始加载的文本提醒,"刷新中.." ]
                                            </div>
                                        </li>
                                        
                                        <li class="param">
                                            
                                                <code class="param-name">release</code>
                                                <span class="type">String</span>
                                            

                                            <div class="param-description">
                                                [ 下拉的文本提醒,"松开刷新" ]
                                            </div>
                                        </li>
                                        
                                        <li class="param">
                                            
                                                <code class="param-name">end</code>
                                                <span class="type">String</span>
                                            

                                            <div class="param-description">
                                                [ 下拉高度不足提醒,"下拉刷新" ]
                                            </div>
                                        </li>
                                        
                                        <li class="param">
                                            
                                                <code class="param-name">fail</code>
                                                <span class="type">String</span>
                                            

                                            <div class="param-description">
                                                [ 下拉加载失败提醒,"点击加载" ]
                                            </div>
                                        </li>
                                        
                                        <li class="param">
                                            
                                                <code class="param-name">success</code>
                                                <span class="type">String</span>
                                            

                                            <div class="param-description">
                                                [ 成功提醒,"刷新成功" ]
                                            </div>
                                        </li>
                                        
                                    </ul>
                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name">scrollTips</code>
                                    <span class="type">Object</span>
                                

                                <div class="param-description">
                                    
                                </div>

                                
                                    <ul class="params-list">
                                        
                                        <li class="param">
                                            
                                                <code class="param-name">start</code>
                                                <span class="type">String</span>
                                            

                                            <div class="param-description">
                                                [ 开始加载的文本提醒,"努力加载中.." ]
                                            </div>
                                        </li>
                                        
                                        <li class="param">
                                            
                                                <code class="param-name">end</code>
                                                <span class="type">String</span>
                                            

                                            <div class="param-description">
                                                [ 上拉加载的提醒,"上拉加载更多" ]
                                            </div>
                                        </li>
                                        
                                        <li class="param">
                                            
                                                <code class="param-name">fail</code>
                                                <span class="type">String</span>
                                            

                                            <div class="param-description">
                                                [ 上拉加载失败提醒,"点击重新加载" ]
                                            </div>
                                        </li>
                                        
                                        <li class="param">
                                            
                                                <code class="param-name">last</code>
                                                <span class="type">String</span>
                                            

                                            <div class="param-description">
                                                [ 最后一页的提醒,"没有更多内容" ]
                                            </div>
                                        </li>
                                        
                                        <li class="param">
                                            
                                                <code class="param-name">nodata</code>
                                                <span class="type">String</span>
                                            

                                            <div class="param-description">
                                                [ 没有数据的提醒,"没有更多内容" ]
                                            </div>
                                        </li>
                                        
                                    </ul>
                                
                            </li>
                            
                        </ul>
                    
                </li>
            
            </ul>
        </div>
    

    

    
        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>html:

       &lt;div id=&quot;scroll&quot; class=&quot;bui-scroll&quot;&gt;
           &lt;div class=&quot;bui-scroll-head&quot;&gt;&lt;/div&gt;
           &lt;div class=&quot;bui-scroll-main&quot;&gt;
               &lt;ul id=&quot;scrollList&quot; class=&quot;bui-list&quot;&gt;
                   &lt;li class=&quot;bui-btn&quot;&gt;这里是循环的内容&lt;/li&gt;
               &lt;/ul&gt;
           &lt;/div&gt;
           &lt;div class=&quot;bui-scroll-foot&quot;&gt;&lt;/div&gt;
       &lt;/div&gt;

js:

       // 初始化
       var uiScroll = bui.scroll({
           id: &quot;#scroll&quot;,
           children: &quot;.bui-list&quot;,
           page:1,
           pageSize:10,
           onRefresh: refresh,
           onLoad: getData
       })

       //刷新数据
       function refresh () {

           page = 1;
           pagesize = 10;
           //请求数据
           getData(page,pagesize,&quot;html&quot;);
       }

       //滚动加载下一页
       function getData (page,pagesize,command) {
           command = command || &quot;append&quot;;

           bui.ajax({
               url: &quot;http://localhost/mysite/yumeng/index.php/API/Usercenter/getUserList&quot;,
               data: {
                   pageindex:page,
                   pagesize:pagesize
               }
           }).done(function(res) {

               var data = JSON.parse(res);//有可能需要转换,视接口而定

               //生成html
               var html = &quot;&quot;;
               //数据渲染

               //渲染数据
               $(&quot;#scrollList&quot;)[command](html);

               //更新分页信息
               uiScroll.updatePage(start,res.data);
               //还原位置
               uiScroll.reverse();

           }).fail(function (res) {

               // 可以点击重新加载
               uiScroll.fail(start,pagesize,res);
           })
       }</code></pre>

            </div>
        </div>
    
</div>

    </div>


<div id="classdocs" class="tabview">
    <ul class="api-class-tabs">
        <li class="api-class-tab index"><a href="#index">Index</a></li>

        
            <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
        
        
        
        
            <li class="api-class-tab events"><a href="#events">Events</a></li>
        
    </ul>

    <div>
        <div id="index" class="api-class-tabpanel index">
            <h2 class="off-left">Item Index</h2>

            
                <div class="index-section methods">
                    <h3>Methods</h3>

                    <ul class="index-list methods">
                        
                            <li class="index-item method">
                                <a href="#method_destroy">destroy</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_fail">fail</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_filter">filter</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_getPage">getPage</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_init">init</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_load">load</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_lock">lock</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_nextPage">nextPage</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_option">option</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_prevPage">prevPage</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_refresh">refresh</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_resize">resize</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_reverse">reverse</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_scrollTop">scrollTop</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_setHeight">setHeight</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_to">to</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_toBottom">toBottom</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_unlock">unlock</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_updatePage">updatePage</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_widget">widget</a>

                                
                                
                            </li>
                        
                    </ul>
                </div>
            

            

            

            
                <div class="index-section events">
                    <h3>Events</h3>

                    <ul class="index-list events">
                        
                            <li class="index-item event">
                                <a href="#event_off">off</a>

                                
                                
                            </li>
                        
                            <li class="index-item event">
                                <a href="#event_on">on</a>

                                
                                
                            </li>
                        
                    </ul>
                </div>
            
        </div>

        
            <div id="methods" class="api-class-tabpanel">
                <h2 class="off-left">Methods</h2>

                
                    <div id="method_destroy" class="method item">
    <h3 class="name"><code>destroy</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code class="optional">[bool]</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l948"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:948</code></a>
        
        </p>


        

        
            <p>Available since 1.4.2</p>
        
    </div>

    <div class="description">
        <p>[销毁控件]</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name optional">[bool]</code>
                        <span class="type">Boolean</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>[ 默认: false 销毁部分 | true 销毁全部   ]</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>       //销毁
       uiScroll.destroy();</code></pre>

            </div>
        </div>
    
</div>

                
                    <div id="method_fail" class="method item">
    <h3 class="name"><code>fail</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code class="optional">[start]</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code class="optional">[count]</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    
        <span class="flag chainable">chainable</span>
    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l627"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:627</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>失败点击可以重新加载当前页</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name optional">[start]</code>
                        <span class="type">Number</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>第几页</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name optional">[count]</code>
                        <span class="type">Number</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>每页多少条</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>       //回调里面触发 uiScroll基于顶部例子
       uiScroll.fail();</code></pre>

            </div>
        </div>
    
</div>

                
                    <div id="method_filter" class="method item">
    <h3 class="name"><code>filter</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>keyword</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>key</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type">Array</span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l661"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:661</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>数据过滤,用于已有缓存过滤</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">keyword</code>
                        <span class="type">String</span>
                    

                    

                    <div class="param-description">
                        <p>关键字</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">key</code>
                        <span class="type">String</span>
                    

                    

                    <div class="param-description">
                        <p>在哪个字段</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type">Array</span>:
                    
                    <p>[返回符合条件的数据]</p>

                
            </div>
        </div>
    

    
        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>       //过滤数据中的phone字段,是否含有139224这个数据
       var filterData = uiScroll.filter(&quot;139224&quot;,&quot;phone&quot;);</code></pre>

            </div>
        </div>
    
</div>

                
                    <div id="method_getPage" class="method item">
    <h3 class="name"><code>getPage</code></h3>

    
        <span class="paren">()</span>
    

    
        <span class="returns-inline">
            <span class="type"></span>
        </span>
    

    

    

    

    

    
        <span class="flag chainable">chainable</span>
    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l476"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:476</code></a>
        
        </p>


        

        
            <p>Available since 1.5.3</p>
        
    </div>

    <div class="description">
        <p>获取当前在第几页</p>

    </div>

    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                    <p>[object] [ 返回 page ]</p>

                
            </div>
        </div>
    

    
        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>       // 获取当前在第几页
       var currentPage = uiScroll.getPage();</code></pre>

            </div>
        </div>
    
</div>

                
                    <div id="method_init" class="method item">
    <h3 class="name"><code>init</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code class="optional">[option]</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    
        <span class="flag chainable">chainable</span>
    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l274"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:274</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>初始化方法,用于重新初始化结构,事件只初始化一次</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name optional">[option]</code>
                        <span class="type">Object</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>[参数控件本身]</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_load" class="method item">
    <h3 class="name"><code>load</code></h3>

    
        <span class="paren">()</span>
    

    

    

    

    

    

    
        <span class="flag chainable">chainable</span>
    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l871"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:871</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>手动加载更多数据</p>

    </div>

    

    

    
        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>       //uiScroll基于顶部例子
       uiScroll.load();</code></pre>

            </div>
        </div>
    
</div>

                
                    <div id="method_lock" class="method item">
    <h3 class="name"><code>lock</code></h3>

    
        <span class="paren">()</span>
    

    

    

    

    

    

    
        <span class="flag chainable">chainable</span>
    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l813"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:813</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>不允许滚动加载</p>

    </div>

    

    

    
        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>       //uiScroll基于顶部例子
       uiScroll.lock();</code></pre>

            </div>
        </div>
    
</div>

                
                    <div id="method_nextPage" class="method item">
    <h3 class="name"><code>nextPage</code></h3>

    
        <span class="paren">()</span>
    

    

    

    

    

    

    
        <span class="flag chainable">chainable</span>
    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l889"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:889</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>加载下一页数据</p>

    </div>

    

    

    
        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>       //uiScroll基于顶部例子
       uiScroll.nextPage();</code></pre>

            </div>
        </div>
    
</div>

                
                    <div id="method_option" class="method item">
    <h3 class="name"><code>option</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code class="optional">[key]</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code class="optional">[value]</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    
        <span class="flag chainable">chainable</span>
    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l992"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:992</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>获取设置参数</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name optional">[key]</code>
                        <span class="type">String | object</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>[ 不传则获取所有参数, 类型为string,没有第2个参数则获取某个参数 ]</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name optional">[value]</code>
                        <span class="type">String | number | boolean | function</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>[ 设置参数的时候要传,设置多个参数不用传,获取参数的时候也不用传 ]</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>       //获取所有参数
        //获取所有参数
       var option = uiScroll.option();

       //获取某个参数
       var id = uiScroll.option( &quot;id&quot; );

       //修改一个参数
       uiScroll.option( &quot;distance&quot;,100 );

       //修改多个参数
       uiScroll.option( {&quot;distance&quot;:100} );</code></pre>

            </div>
        </div>
    
</div>

                
                    <div id="method_prevPage" class="method item">
    <h3 class="name"><code>prevPage</code></h3>

    
        <span class="paren">()</span>
    

    

    

    

    

    

    
        <span class="flag chainable">chainable</span>
    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l903"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:903</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>加载上一页数据</p>

    </div>

    

    

    
        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>       //uiScroll基于顶部例子
       uiScroll.prevPage();</code></pre>

            </div>
        </div>
    
</div>

                
                    <div id="method_refresh" class="method item">
    <h3 class="name"><code>refresh</code></h3>

    
        <span class="paren">()</span>
    

    

    

    

    

    

    
        <span class="flag chainable">chainable</span>
    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l852"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:852</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>手动执行刷新数据</p>

    </div>

    

    

    
        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>       //uiScroll基于顶部例子
       uiScroll.refresh();</code></pre>

            </div>
        </div>
    
</div>

                
                    <div id="method_resize" class="method item">
    <h3 class="name"><code>resize</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code class="optional">[option]</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    
        <span class="flag chainable">chainable</span>
    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l922"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:922</code></a>
        
        </p>


        

        
            <p>Available since 1.5.3</p>
        
    </div>

    <div class="description">
        <p>重新计算高度</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name optional">[option]</code>
                        <span class="type">Object</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>[ 可以不传 ]</p>

                    </div>

                    
                        <ul class="params-list">
                            
                            <li class="param">
                                
                                    <code class="param-name optional">[width]</code>
                                    <span class="type">Number</span>
                                    <span class="flag optional" title="This parameter is optional.">optional</span>
                                

                                <div class="param-description">
                                    <p>[ 如果不传则自动计算 ]</p>

                                </div>

                                
                            </li>
                            
                            <li class="param">
                                
                                    <code class="param-name optional">[height]</code>
                                    <span class="type">Number</span>
                                    <span class="flag optional" title="This parameter is optional.">optional</span>
                                

                                <div class="param-description">
                                    <p>[ 如果不传则自动计算,一些特殊情况需要告诉它在哪个高度下自动计算 ]</p>

                                </div>

                                
                            </li>
                            
                        </ul>
                    
                </li>
            
            </ul>
        </div>
    

    

    
        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>      //重新计算高度
      uiScroll.resize();</code></pre>

            </div>
        </div>
    
</div>

                
                    <div id="method_reverse" class="method item">
    <h3 class="name"><code>reverse</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code class="optional">[callback]</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    
        <span class="flag chainable">chainable</span>
    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l591"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:591</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>返回原位</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name optional">[callback]</code>
                        <span class="type">Function</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>回调</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>       //回调里面触发 uiScroll基于顶部例子
       uiScroll.reverse();</code></pre>

            </div>
        </div>
    
</div>

                
                    <div id="method_scrollTop" class="method item">
    <h3 class="name"><code>scrollTop</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code class="optional">[num]</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    
        <span class="flag chainable">chainable</span>
    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l757"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:757</code></a>
        
        </p>


        

        
            <p>Available since 1.4.3</p>
        
    </div>

    <div class="description">
        <p>跳到指定的滚动高度值</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name optional">[num]</code>
                        <span class="type">Number | Object</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>[ 非必须,默认:0 ]</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>       uiScroll.scrollTop(2);</code></pre>

            </div>
        </div>
    
</div>

                
                    <div id="method_setHeight" class="method item">
    <h3 class="name"><code>setHeight</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code class="optional">[height]</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    
        <span class="flag chainable">chainable</span>
    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l784"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:784</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>设置滚动的高度,常用于$(window).resize(fun)</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name optional">[height]</code>
                        <span class="type">Number | String</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>设置的高度</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>       //uiScroll基于顶部例子
       uiScroll.setHeight(300);</code></pre>

            </div>
        </div>
    
</div>

                
                    <div id="method_to" class="method item">
    <h3 class="name"><code>to</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>index</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>callback</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    
        <span class="flag chainable">chainable</span>
    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l696"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:696</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>跳到指定元素</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">index</code>
                        <span class="type">Number</span>
                    

                    

                    <div class="param-description">
                        <p>内容的索引,例如第3个li 则 index=2</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">callback</code>
                        <span class="type">Function</span>
                    

                    

                    <div class="param-description">
                        <p>跳转后执行</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>       uiScroll.to(2);</code></pre>

            </div>
        </div>
    
</div>

                
                    <div id="method_toBottom" class="method item">
    <h3 class="name"><code>toBottom</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>callback</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    
        <span class="flag chainable">chainable</span>
    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l733"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:733</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>跳到底部</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">callback</code>
                        <span class="type">Function</span>
                    

                    

                    <div class="param-description">
                        <p>跳转后执行</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>       uiScroll.toBottom();</code></pre>

            </div>
        </div>
    
</div>

                
                    <div id="method_unlock" class="method item">
    <h3 class="name"><code>unlock</code></h3>

    
        <span class="paren">()</span>
    

    

    

    

    

    

    
        <span class="flag chainable">chainable</span>
    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l832"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:832</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>允许滚动加载</p>

    </div>

    

    

    
        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>       //uiScroll基于顶部例子
       uiScroll.unlock();</code></pre>

            </div>
        </div>
    
</div>

                
                    <div id="method_updatePage" class="method item">
    <h3 class="name"><code>updatePage</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>start</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>data</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    
        <span class="flag chainable">chainable</span>
    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l492"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:492</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>更新请求的分页及缓存,并继续请求下一页, 旧接口<del>updateCache</del>不再使用.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">start</code>
                        <span class="type">String</span>
                    

                    

                    <div class="param-description">
                        <p>[当前分页]</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">data</code>
                        <span class="type">Object</span>
                    

                    

                    <div class="param-description">
                        <p>[当前数据]</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>       //回调里面触发 uiScroll基于顶部例子
       uiScroll.updatePage(2,data);</code></pre>

            </div>
        </div>
    
</div>

                
                    <div id="method_widget" class="method item">
    <h3 class="name"><code>widget</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code class="optional">[name]</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l977"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:977</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>获取依赖的控件</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name optional">[name]</code>
                        <span class="type">String</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>[ 依赖控件名 pullrefresh loading ]</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>       //获取依赖控件
       var uiScrollWidget = uiScroll.widget();</code></pre>

            </div>
        </div>
    
</div>

                
            </div>
        

        

        

        
            <div id="events" class="api-class-tabpanel">
                <h2 class="off-left">Events</h2>

                
                    <div id="event_off" class="events item">
    <h3 class="name"><code>off</code></h3>
    <span class="type"></span>

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l1039"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:1039</code></a>
        
        </p>

        

        
            <p>Available since 1.3.0</p>
        
    </div>

    <div class="description">
        <p>为控件取消绑定事件</p>

    </div>

    
        <div class="params">
            <h4>Event Payload:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name optional">[type]</code>
                        <span class="type">String</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>[ 事件类型: &quot;loadpage&quot;(数据加载后) | &quot;lastpage&quot;(加载最后一页时触发) | &quot;scrollend&quot;(每次滚动结束) | &quot;scrolltop&quot;(滚动到顶部) |&quot;scrollbottom&quot;(滚动到底部)  ]</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name optional">[callback]</code>
                        <span class="type">Function</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>[ 绑定的事件, this 为当前点击的菜单 ]</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    


    
        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>       uiScroll.off(&quot;scrollend&quot;);</code></pre>

            </div>
        </div>
    
</div>

                
                    <div id="event_on" class="events item">
    <h3 class="name"><code>on</code></h3>
    <span class="type"></span>

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/_Users_wilson_personal_htdocs_opensource_bui-rollup_src_scripts_ui_bui.scroll.js.html#l1019"><code>&#x2F;Users&#x2F;wilson&#x2F;personal&#x2F;htdocs&#x2F;opensource&#x2F;bui-rollup&#x2F;src&#x2F;scripts&#x2F;ui&#x2F;bui.scroll.js:1019</code></a>
        
        </p>

        

        
            <p>Available since 1.3.0</p>
        
    </div>

    <div class="description">
        <p>为控件绑定事件</p>

    </div>

    
        <div class="params">
            <h4>Event Payload:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name optional">[type]</code>
                        <span class="type">String</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>[ 事件类型: &quot;loadpage&quot;(数据加载后) | &quot;lastpage&quot;(加载最后一页时触发) | &quot;scrollend&quot;(每次滚动结束) | &quot;scrolltop&quot;(滚动到顶部) |&quot;scrollbottom&quot;(滚动到底部)   ]</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name optional">[callback]</code>
                        <span class="type">Function</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>[ 绑定的事件, this 为当前点击的菜单 ]</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    


    
        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>       uiScroll.on(&quot;scrollend&quot;,function () {
           // 点击的菜单
           console.log(this);
       });</code></pre>

            </div>
        </div>
    
</div>

                
            </div>
        
    </div>
</div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../assets/../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
<!-- 百度统计 -->
<script>
var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?1e19beda5d47048a31939f0f67d9b1f9";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>


</body>
</html>
